<template>
	<vab-query-form>
		<el-form ref="formSearch" v-model="value" @submit.native.prevent :inline="inline2" :label-width="null"
			v-bind="$props" v-on="$listeners">
			<slot name="ParentIDBefore"></slot>
			<slot name="ParentID">
				<!-- <el-form-item :label="keyLan['ParentID']+':'">
                    <el-input-number type="number" v-model.number="search.minParentID" :controls="false" pattern="\d*"
                        @keyup.native.enter="getListParent" style="width:80px;">
                    </el-input-number>
                    {{comLan["to"]}}
                    <el-input-number type="number" v-model.number="search.maxParentID" :controls="false" pattern="\d*"
                        @keyup.native.enter="getListParent" style="width:80px;">
                    </el-input-number>
                </el-form-item> -->
				<el-form-item :label="replaceID(keyLan['ParentID'])+':'" v-if="user.isAdminStore||user.isMainStore">
					<remoteselect v-model="value.ParentID" url="api/System/SysStoreListSelect"
						value-label="SysStoreName" value-key="SysStoreID" query-key="selectIDName"
						:placeholder="replaceID(keyLan['ParentID'])" style="width:150px;"
						:queryParameters="{EnumSysStoreType:0}">
						<template v-slot="{ row }">
							{{row.SysStoreName}}
						</template>
					</remoteselect>
				</el-form-item>
			</slot>
			<slot name="ParentIDAfter"></slot>
			<slot name="EnumSysStoreTypeBefore"></slot>
			<slot name="EnumSysStoreType">
				<el-form-item>
					<el-select v-model="value.EnumSysStoreType" clearable style="width:120px;"
						:placeholder="keyLan['EnumSysStoreType']">
						<el-option v-for="item in EnumSysStoreType" :key="item.Value" :value="item.Value"
							:label="enumLanTxt(item.Label)">
						</el-option>
					</el-select>
				</el-form-item>
			</slot>
			<slot name="EnumSysStoreTypeAfter"></slot>
			<slot name="SysStoreNameBefore"></slot>
			<slot name="SysStoreName">
				<el-form-item>
					<el-input v-model="value.SysStoreName__PY" :placeholder="keyLan['SysStoreName']"
						@keyup.native.enter="getListParent" style="width:120px">
					</el-input>
				</el-form-item>
			</slot>
			<slot name="SysStoreNameAfter"></slot>
			<slot name="DirectorBefore"></slot>
			<slot name="Director">
				<el-form-item>
					<el-input v-model="value.Director" :placeholder="keyLan['Director']"
						@keyup.native.enter="getListParent" style="width:120px">
					</el-input>
				</el-form-item>
			</slot>
			<slot name="DirectorAfter"></slot>
			<slot name="PhoneNumberBefore"></slot>
			<slot name="PhoneNumber">
				<el-form-item>
					<el-input v-model="value.PhoneNumber" :placeholder="keyLan['PhoneNumber']"
						@keyup.native.enter="getListParent" style="width:120px">
					</el-input>
				</el-form-item>
			</slot>
			<slot name="PhoneNumberAfter"></slot>
			<slot name="ProvinceBefore"></slot>
			<slot name="Province">
				<el-form-item>
					<el-input v-model="value.Province" :placeholder="keyLan['Province']"
						@keyup.native.enter="getListParent" style="width:120px">
					</el-input>
				</el-form-item>
			</slot>
			<slot name="ProvinceAfter"></slot>
			<slot name="CityBefore"></slot>
			<slot name="City">
				<el-form-item>
					<el-input v-model="value.City" :placeholder="keyLan['City']" @keyup.native.enter="getListParent"
						style="width:120px">
					</el-input>
				</el-form-item>
			</slot>
			<slot name="CityAfter"></slot>
			<slot name="DistrictBefore"></slot>
			<slot name="District">
				<el-form-item>
					<el-input v-model="value.District" :placeholder="keyLan['District']"
						@keyup.native.enter="getListParent" style="width:120px">
					</el-input>
				</el-form-item>
			</slot>
			<slot name="DistrictAfter"></slot>
			<slot name="AddressBefore"></slot>
			<slot name="Address">
				<el-form-item>
					<el-input v-model="value.Address" :placeholder="keyLan['Address']"
						@keyup.native.enter="getListParent" style="width:120px">
					</el-input>
				</el-form-item>
			</slot>
			<slot name="AddressAfter"></slot>
			<slot name="LongitudeBefore"></slot>
			<!-- <slot name="Longitude">
                <el-form-item :label="keyLan['Longitude']+':'">
                    <el-input-number type="number" v-model.number="search.minLongitude" :controls="false"
                        pattern="[\d,]+\.?[\d]*" @keyup.native.enter="getListParent" style="width:80px;">
                    </el-input-number>
                    {{comLan["to"]}}
                    <el-input-number type="number" v-model.number="search.maxLongitude" :controls="false"
                        pattern="[\d,]+\.?[\d]*" @keyup.native.enter="getListParent" style="width:80px;">
                    </el-input-number>
                </el-form-item>
            </slot>
            <slot name="LongitudeAfter"></slot>
            <slot name="LatitudeBefore"></slot>
            <slot name="Latitude">
                <el-form-item :label="keyLan['Latitude']+':'">
                    <el-input-number type="number" v-model.number="search.minLatitude" :controls="false"
                        pattern="[\d,]+\.?[\d]*" @keyup.native.enter="getListParent" style="width:80px;">
                    </el-input-number>
                    {{comLan["to"]}}
                    <el-input-number type="number" v-model.number="search.maxLatitude" :controls="false"
                        pattern="[\d,]+\.?[\d]*" @keyup.native.enter="getListParent" style="width:80px;">
                    </el-input-number>
                </el-form-item>
            </slot> -->
			<slot name="MaxStoreCountBefore"></slot>
			<slot name="MaxStoreCount">
				<el-form-item :label="keyLan['MaxStoreCount']+':'" v-if="user.isAdminStore">
					<el-input-number type="number" v-model.number="search.minMaxStoreCount" :controls="false"
						pattern="\d*" @keyup.native.enter="getListParent" style="width:80px;">
					</el-input-number>
					{{comLan["to"]}}
					<el-input-number type="number" v-model.number="search.maxMaxStoreCount" :controls="false"
						pattern="\d*" @keyup.native.enter="getListParent" style="width:80px;">
					</el-input-number>
				</el-form-item>
			</slot>
			<slot name="MaxStoreCountAfter"></slot>

			<slot name="LatitudeAfter"></slot>
			<slot name="EnumStatusBefore"></slot>
			<slot name="EnumStatus">
				<el-form-item>
					<el-select v-model="value.EnumStatus" clearable style="width:120px;"
						:placeholder="keyLan['EnumStatus']">
						<el-option v-for="item in EnumStatus" :key="item.Value" :value="item.Value"
							:label="enumLanTxt(item.Label)">
						</el-option>
					</el-select>
				</el-form-item>
			</slot>
			<slot name="EnumStatusAfter"></slot>
			<slot name="CreateDateBefore"></slot>
			<slot name="CreateDate">
				<el-form-item :label="keyLan['CreateDate']+':'">
					<el-date-picker v-model="value.CreateDate" type="daterange" :placeholder="keyLan['CreateDate']"
						style="width:220px">
					</el-date-picker>
				</el-form-item>
			</slot>
			<slot name="CreateDateAfter"></slot>

			<el-form-item>
				<el-button icon="el-icon-search" type="primary" @click="getListParent" :loading="$parent.loading">
					{{comLan["btnSearch"]}}
				</el-button>
				<slot name="replace">
					<slot name="btnAdd">
						<el-button icon="el-icon-plus" type="primary" @click="btnAddParent" v-if="buttonParent.新建">
							{{comLan["btnAdd"]}}
						</el-button>
					</slot>
					<slot name="btnExport">
						<el-button icon="el-icon-download" type="primary" @click="btnExportParent"
							v-if="buttonParent.导出">
							{{comLan["btnExport"]}}
						</el-button>
					</slot>
					<slot></slot>
				</slot>
			</el-form-item>
		</el-form>
	</vab-query-form>
</template>

<script>
	import common from "@/common/common.js";
	import js from "@/System/Partial/SysStore/js.js";
	export default {
		name: "SysStoreListSearch",
		mixins: [common.baseVM, js]
	}
</script>
